start_pos = MIN (text_length, start_pos);
end_pos = MIN (text_length, end_pos);
- start_index = g_utf8_offset_to_pointer (text, start_pos) - entry->text;
- end_index = g_utf8_offset_to_pointer (text, end_pos) - entry->text;
+ start_index = g_utf8_offset_to_pointer (text, start_pos) - text;
+ end_index = g_utf8_offset_to_pointer (text, end_pos) - text;
return g_strndup (text + start_index, end_index - start_index);
}
GParamSpec *spec,
GtkEntry *entry)
{
- /* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
- entry->text = (gchar*)gtk_entry_buffer_get_text (buffer);
-
gtk_entry_recompute (entry);
emit_changed (entry);
g_object_notify (G_OBJECT (entry), "text");
GParamSpec *spec,
GtkEntry *entry)
{
- /* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
- entry->text_length = gtk_entry_buffer_get_length (buffer);
-
g_object_notify (G_OBJECT (entry), "text-length");
}
GParamSpec *spec,
GtkEntry *entry)
{
- /* COMPAT: Deprecated, not used. This struct field will be removed in GTK+ 3.x */
- entry->text_max_length = gtk_entry_buffer_get_max_length (buffer);
-
g_object_notify (G_OBJECT (entry), "max-length");
}
{
buffer_disconnect_signals (entry);
g_object_unref (priv->buffer);
-
- /* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
- entry->text = NULL;
- entry->text_length = 0;
- entry->text_max_length = 0;
}
priv->buffer = buffer;
if (priv->buffer)
- {
- buffer_connect_signals (entry);
-
- /* COMPAT: Deprecated. Not used. Setting these fields no longer necessary in GTK 3.x */
- entry->text = (char*)gtk_entry_buffer_get_text (priv->buffer);
- entry->text_length = gtk_entry_buffer_get_length (priv->buffer);
- entry->text_max_length = gtk_entry_buffer_get_max_length (priv->buffer);
- }
+ buffer_connect_signals (entry);
obj = G_OBJECT (entry);
g_object_freeze_notify (obj);
{
GtkWidget widget;
- gchar *GSEAL (text); /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
-
guint GSEAL (editable) : 1;
guint GSEAL (visible) : 1;
guint GSEAL (overwrite_mode) : 1;
guint GSEAL (in_drag) : 1; /* FIXME: Should be private?
Dragging within the selection */
- guint16 GSEAL (text_length); /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
- guint16 GSEAL (text_max_length); /* COMPAT: Deprecated, not used. Remove in GTK+ 3.x */
-
/*< private >*/
GdkWindow *GSEAL (text_area);
GtkIMContext *GSEAL (im_context);